﻿<UserControl x:Class="Epi.WPF.Dashboard.Controls.GadgetStrataListPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:EpiDashboard="clr-namespace:Epi.WPF.Dashboard"          
             xmlns:Controls="clr-namespace:Epi.WPF.Dashboard.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="570">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../ResourceDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>        
        <Expander x:Name="expander" Grid.Row="1" IsExpanded="True" Margin="{DynamicResource expanderMargin}" Width="Auto">
            <Expander.Header>
                <TextBlock x:Name="txtExpanderHeader" Style="{DynamicResource genericOutputExpanderText}">Stratas</TextBlock>
            </Expander.Header>
            <Grid x:Name="grdOuter">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                
                <Grid x:Name="grdMain" Grid.Row="0" Width="Auto" Margin="5">
                </Grid>

                <Grid x:Name="grdButtons" Margin="5, 1, 1, 1" Grid.Row="1" Width="Auto">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                
                    <Grid HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" Name="grdExpandAllButton" Width="128" Height="20" Margin="0, 1, 10, 1" Visibility="Visible" >
                    <Rectangle x:Name="expandAllRectangle" Style="{DynamicResource swapValuesRectangle}"/>
                    <Rectangle Opacity="0.5" Stroke="Transparent" Margin="1"  MouseEnter="PathExpandAll_MouseEnter" MouseLeave="PathExpandAll_MouseLeave" MouseLeftButtonUp="PathExpandAll_MouseLeftButtonUp" >
                        <Rectangle.ToolTip>
                            <ToolTip x:Name="toolTipExpandAll">Expands all stratification output tables.</ToolTip>
                        </Rectangle.ToolTip>
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="white" Offset="0" />
                                        <GradientStop Color="transparent" Offset="1" />
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" IsHitTestVisible="False">Expand / show all</TextBlock>
                    </Grid>

                <Grid HorizontalAlignment="Left" Grid.Column="1" Grid.Row="0" Name="grdRemoveSortButton" Width="128" Height="20" Margin="0, 1, 10, 1" Visibility="Visible" >
                    <Rectangle x:Name="removeSortRectangle" Style="{DynamicResource swapValuesRectangle}"/>
                    <Rectangle Opacity="0.5" Stroke="Transparent" Margin="1"  MouseEnter="PathRemoveSort_MouseEnter" MouseLeave="PathRemoveSort_MouseLeave" MouseLeftButtonUp="PathRemoveSort_MouseLeftButtonUp" >
                        <Rectangle.ToolTip>
                            <ToolTip x:Name="toolTipRemoveSort">Removes any sorting being conducted on the stratification grid list.</ToolTip>
                        </Rectangle.ToolTip>
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <LinearGradientBrush.GradientStops>
                                    <GradientStopCollection>
                                        <GradientStop Color="white" Offset="0" />
                                        <GradientStop Color="transparent" Offset="1" />
                                    </GradientStopCollection>
                                </LinearGradientBrush.GradientStops>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" IsHitTestVisible="False">Remove sorting</TextBlock>
                </Grid>
                </Grid>
            </Grid>
        </Expander>
    </Grid>
</UserControl>
